import {
    x as y,
    c as ne,
    s as re,
    r as pe,
    i as n,
    o as i,
    a as k,
    m as e,
    l,
    b as $,
    e as u,
    t as R,
    F as G,
    k as c,
    j as ee,
    u as h,
    d as Z,
    T as ye,
    O as N,
    P as q,
    E as j,
    U as we,
    Q as ue,
    w as Q,
    B as V,
    A as Ve,
    H as de
} from "./index-abba05ce.js";

const he = {class: "mb-4"}, ke = {style: {width: "calc(100% - 350px)"}}, xe = {class: "mobile-wrap"},
    Ce = $("div", {class: "mobile-title"}, "详情预览", -1), Ue = ["innerHTML"], $e = {key: 2, class: "scroll-view"},
    ze = {class: "dialog-footer"}, De = {
        __name: "edit", emits: ["success", "close"], setup(me, {expose: T, emit: P}) {
            const v = P, H = y(null), g = y(null), w = y("add"), _ = y(1), le = y(null), z = y(""), F = y(!1),
                L = ne(() => re.state.app.config), a = y({
                    id: 0,
                    imgs: "",
                    name: "",
                    tags: [],
                    intro: "",
                    details: "",
                    type: 1,
                    link: "",
                    weigh: 0,
                    status: 1,
                    classify_ids: [],
                    product: [{id: 0, price: "", line_price: "", img: "", name: "", stock: 0, weigh: 0, status: 1}]
                }), x = pe({
                    imgs: [{required: !0, message: "请上传商品图", trigger: "blur"}],
                    name: [{required: !0, message: "请填写商品名称", trigger: "blur"}],
                    intro: [{required: !0, message: "请填写商品介绍", trigger: "blur"}]
                }), r = ne(() => w.value == "edit" ? "编辑商品" : "新增商品"), I = y([]), te = async () => {
                    if (L.value.classify) {
                        const p = await N.classify.classify({type: 1});
                        I.value = p.data
                    }
                }, C = p => {
                    a.value.tags.splice(a.value.tags.indexOf(p), 1)
                }, K = () => {
                    z.value && a.value.tags.push(z.value), F.value = !1, z.value = ""
                }, S = () => {
                    M()
                }, ae = () => {
                    a.value.product = a.value.product.concat({
                        id: 0,
                        price: "",
                        line_price: "",
                        img: "",
                        name: "",
                        stock: 0,
                        weigh: 0,
                        status: 1
                    })
                }, m = p => {
                    if (a.value.product.length > 1) q.confirm("确定要删除吗？").then(o => {
                        a.value.product.splice(p, 1)
                    }); else return j.error("不能再少了，至少添加 1 个规格！")
                }, oe = async p => {
                    if (w.value != "add") {
                        const o = await N.goods.detail({id: p.id});
                        a.value = o.data;
                        let s = a.value.classify_ids.map(d => parseInt(d));
                        a.value.classify_ids = s, console.log("formData.value", a.value)
                    }
                }, B = (p = "add") => {
                    w.value = p, H.value.open()
                }, M = () => {
                    g.value.resetFields(), v("close")
                }, J = async p => {
                    var s, d;
                    const o = _.value;
                    p == "confirm" ? (await ((s = g.value) == null ? void 0 : s.validateField(["imgs", "name", "intro"])), o == 1 ? _.value = 2 : o == 2 ? (await ((d = g.value) == null ? void 0 : d.validateField(["details"])), _.value = 3) : o == 3 && W()) : o == 1 ? M() : o == 2 ? _.value = 1 : o == 3 && (_.value = 2)
                }, W = async () => {
                    var s;
                    await ((s = g.value) == null ? void 0 : s.validate());
                    let p = 0;
                    for (let d in a.value.product) {
                        if (a.value.product[d].img) if (a.value.product[d].name) if (a.value.product[d].price) {
                            if (!a.value.product[d].line_price) return j.error("规格：第 " + (parseInt(d) + 1) + " 个规格原价不能为空！")
                        } else return j.error("规格：第 " + (parseInt(d) + 1) + " 个规格现价不能为空！"); else return j.error("规格：第 " + (parseInt(d) + 1) + " 个规格名称不能为空！"); else return j.error("规格：第 " + (parseInt(d) + 1) + " 个规格图片不能为空！");
                        a.value.product[d].status == 1 && p++
                    }
                    if (a.value.status == 1 && p <= 0) return j.error("商品正常展示时，至少需要1个正常规格！");
                    let o;
                    w.value == "edit" ? o = await N.goods.update(a.value) : o = await N.goods.create(a.value), o.error ? q.msgError(o.msg) : (M(), v("success"), q.msgSuccess(o.msg))
                };
            return te(), T({open: B, setFormData: oe}), (p, o) => {
                const s = n("el-step"), d = n("el-steps"), X = n("la-uploader"), Y = n("el-text"), b = n("el-form-item"),
                    O = n("el-input"), ce = n("el-option"), _e = n("el-select"), fe = n("el-tag"), A = n("el-button"),
                    E = n("el-radio"), se = n("el-radio-group"), D = n("el-input-number"), ve = n("la-editor"),
                    ie = n("el-row"), U = n("el-table-column"), ge = n("el-table"), be = n("el-form");
                return i(), k("div", null, [e(ye, {
                    ref_key: "dialogRef",
                    ref: H,
                    title: r.value,
                    async: !0,
                    onConfirm: W,
                    onCancel: S,
                    width: "90vw",
                    showFooter: !1
                }, {
                    footer: l(() => [$("div", ze, [e(A, {onClick: o[13] || (o[13] = t => J("cancel"))}, {
                        default: l(() => [u(R(_.value == 1 ? "取消" : "上一步"), 1)]),
                        _: 1
                    }), e(A, {
                        type: "primary",
                        onClick: o[14] || (o[14] = t => J("confirm"))
                    }, {default: l(() => [u(R(_.value == 3 ? "确定" : "下一步"), 1)]), _: 1})])]),
                    default: l(() => [$("div", he, [e(d, {
                        active: _.value,
                        "process-status": "wait",
                        "finish-status": "process",
                        simple: "",
                        class: "custom-steps"
                    }, {
                        default: l(() => [e(s, {title: "基础信息", icon: "Tickets"}), e(s, {
                            title: "详情",
                            icon: "Picture"
                        }), e(s, {title: "规格", icon: "TakeawayBox"})]), _: 1
                    }, 8, ["active"])]), e(be, {
                        ref_key: "formRef",
                        ref: g,
                        model: a.value,
                        "label-width": "84px",
                        rules: x
                    }, {
                        default: l(() => [_.value == 1 ? (i(), k(G, {key: 0}, [e(b, {
                            label: "图片",
                            prop: "imgs"
                        }, {
                            default: l(() => [e(X, {
                                modelValue: a.value.imgs,
                                "onUpdate:modelValue": o[0] || (o[0] = t => a.value.imgs = t),
                                limit: "10"
                            }, null, 8, ["modelValue"]), e(Y, {
                                class: "mx-1",
                                size: "small"
                            }, {default: l(() => [u("图片大小不超过5M，最佳尺寸：1:1")]), _: 1})]), _: 1
                        }), e(b, {label: "名称", prop: "name"}, {
                            default: l(() => [e(O, {
                                modelValue: a.value.name,
                                "onUpdate:modelValue": o[1] || (o[1] = t => a.value.name = t),
                                maxlength: "50",
                                placeholder: "请填写",
                                "show-word-limit": ""
                            }, null, 8, ["modelValue"])]), _: 1
                        }), e(b, {label: "简介", prop: "intro"}, {
                            default: l(() => [e(O, {
                                modelValue: a.value.intro,
                                "onUpdate:modelValue": o[2] || (o[2] = t => a.value.intro = t),
                                type: "textarea",
                                maxlength: "200",
                                placeholder: "请填写",
                                "show-word-limit": ""
                            }, null, 8, ["modelValue"])]), _: 1
                        }), L.value.classify ? (i(), c(b, {
                            key: 0,
                            label: "分类"
                        }, {
                            default: l(() => [e(_e, {
                                modelValue: a.value.classify_ids,
                                "onUpdate:modelValue": o[3] || (o[3] = t => a.value.classify_ids = t),
                                multiple: "",
                                clearable: "",
                                filterable: "",
                                placeholder: "请选择",
                                style: {width: "100%"}
                            }, {
                                default: l(() => [(i(!0), k(G, null, ee(I.value, t => (i(), c(ce, {
                                    key: t.id,
                                    label: t.name,
                                    value: t.id
                                }, null, 8, ["label", "value"]))), 128))]), _: 1
                            }, 8, ["modelValue"])]), _: 1
                        })) : h("", !0), e(b, {label: "标签"}, {
                            default: l(() => [(i(!0), k(G, null, ee(a.value.tags, (t, f) => (i(), c(fe, {
                                key: f,
                                style: {margin: "4px"},
                                size: "large",
                                closable: "",
                                "disable-transitions": !1,
                                onClose: Ie => C(t)
                            }, {
                                default: l(() => [u(R(t), 1)]),
                                _: 2
                            }, 1032, ["onClose"]))), 128)), F.value ? (i(), c(O, {
                                key: 0,
                                ref_key: "TagsRef",
                                ref: le,
                                modelValue: z.value,
                                "onUpdate:modelValue": o[4] || (o[4] = t => z.value = t),
                                style: {width: "80px"},
                                maxlength: "8",
                                onKeyup: Z(K, ["enter"]),
                                onBlur: K
                            }, null, 8, ["modelValue"])) : (i(), c(A, {
                                key: 1,
                                onClick: o[5] || (o[5] = t => F.value = !0)
                            }, {default: l(() => [u("+ 添加标签")]), _: 1}))]), _: 1
                        }), L.value.taobao ? (i(), c(b, {
                            key: 1,
                            label: "类型"
                        }, {
                            default: l(() => [e(se, {
                                modelValue: a.value.type,
                                "onUpdate:modelValue": o[6] || (o[6] = t => a.value.type = t)
                            }, {
                                default: l(() => [e(E, {label: 1, value: 1, border: ""}, {
                                    default: l(() => [u("普通商品")]),
                                    _: 1
                                }), e(E, {label: 2, value: 2, border: ""}, {default: l(() => [u("淘宝客")]), _: 1})]), _: 1
                            }, 8, ["modelValue"])]), _: 1
                        })) : h("", !0), a.value.type == 2 ? (i(), c(b, {
                            key: 2,
                            label: "口令链接",
                            prop: "link"
                        }, {
                            default: l(() => [e(O, {
                                modelValue: a.value.link,
                                "onUpdate:modelValue": o[7] || (o[7] = t => a.value.link = t),
                                maxlength: "200",
                                placeholder: "请填写",
                                "show-word-limit": ""
                            }, null, 8, ["modelValue"])]), _: 1
                        })) : h("", !0), e(b, {
                            label: "浏览",
                            prop: "browse"
                        }, {
                            default: l(() => [e(D, {
                                modelValue: a.value.browse,
                                "onUpdate:modelValue": o[8] || (o[8] = t => a.value.browse = t)
                            }, null, 8, ["modelValue"]), e(Y, {
                                class: "mx-1",
                                size: "small"
                            }, {default: l(() => [u("浏览数量")]), _: 1})]), _: 1
                        }), e(b, {label: "购买", prop: "buy"}, {
                            default: l(() => [e(D, {
                                modelValue: a.value.buy,
                                "onUpdate:modelValue": o[9] || (o[9] = t => a.value.buy = t)
                            }, null, 8, ["modelValue"]), e(Y, {
                                class: "mx-1",
                                size: "small"
                            }, {default: l(() => [u("购买数量")]), _: 1})]), _: 1
                        }), e(b, {label: "权重", prop: "weigh"}, {
                            default: l(() => [e(D, {
                                modelValue: a.value.weigh,
                                "onUpdate:modelValue": o[10] || (o[10] = t => a.value.weigh = t),
                                step: 1,
                                precision: 0,
                                min: 0,
                                max: 1e4
                            }, null, 8, ["modelValue"]), e(Y, {
                                class: "mx-1",
                                size: "small"
                            }, {default: l(() => [u("权重越大则排名越靠前")]), _: 1})]), _: 1
                        }), e(b, {label: "状态"}, {
                            default: l(() => [e(se, {
                                modelValue: a.value.status,
                                "onUpdate:modelValue": o[11] || (o[11] = t => a.value.status = t)
                            }, {
                                default: l(() => [e(E, {label: 1, value: 1, border: ""}, {
                                    default: l(() => [u("正常")]),
                                    _: 1
                                }), e(E, {label: 2, value: 2, border: ""}, {default: l(() => [u("下架")]), _: 1})]), _: 1
                            }, 8, ["modelValue"])]), _: 1
                        })], 64)) : h("", !0), _.value == 2 ? (i(), c(ie, {
                            key: 1,
                            justify: "space-between"
                        }, {
                            default: l(() => [$("div", ke, [e(ve, {
                                modelValue: a.value.details,
                                "onUpdate:modelValue": o[12] || (o[12] = t => a.value.details = t),
                                height: 568
                            }, null, 8, ["modelValue"])]), $("div", xe, [Ce, $("div", {
                                class: "mobile-content",
                                innerHTML: a.value.details
                            }, null, 8, Ue)])]), _: 1
                        })) : h("", !0), _.value == 3 ? (i(), k("div", $e, [e(ge, {
                            data: a.value.product,
                            style: {width: "100%"},
                            "header-cell-style": {background: "var(--el-bg-color-page)"},
                            border: ""
                        }, {
                            default: l(() => [e(U, {
                                label: "图片",
                                width: "100"
                            }, {
                                default: l(t => [e(X, {
                                    modelValue: t.row.img,
                                    "onUpdate:modelValue": f => t.row.img = f,
                                    width: "80",
                                    height: "80"
                                }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 1
                            }), e(U, {label: "产品名称", width: ""}, {
                                default: l(t => [e(O, {
                                    modelValue: t.row.name,
                                    "onUpdate:modelValue": f => t.row.name = f,
                                    maxlength: "20",
                                    placeholder: "名称",
                                    "show-word-limit": "",
                                    size: "large"
                                }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 1
                            }), e(U, {label: "现价", width: "180"}, {
                                default: l(t => [e(D, {
                                    style: {width: "100%"},
                                    modelValue: t.row.price,
                                    "onUpdate:modelValue": f => t.row.price = f,
                                    step: 1,
                                    precision: 2,
                                    min: 0.01,
                                    max: 1e5,
                                    placeholder: "现价",
                                    "controls-position": "right",
                                    size: "large"
                                }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 1
                            }), e(U, {label: "原价", width: "180"}, {
                                default: l(t => [e(D, {
                                    style: {width: "100%"},
                                    modelValue: t.row.line_price,
                                    "onUpdate:modelValue": f => t.row.line_price = f,
                                    step: 1,
                                    precision: 2,
                                    min: 0.01,
                                    max: 1e5,
                                    "controls-position": "right",
                                    placeholder: "原价",
                                    size: "large"
                                }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 1
                            }), e(U, {label: "库存", width: "180"}, {
                                default: l(t => [e(D, {
                                    style: {width: "100%"},
                                    modelValue: t.row.stock,
                                    "onUpdate:modelValue": f => t.row.stock = f,
                                    step: 1,
                                    precision: 0,
                                    placeholder: "库存",
                                    min: 0,
                                    max: 1e4,
                                    "controls-position": "right",
                                    size: "large"
                                }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 1
                            }), e(U, {label: "权重", width: "180"}, {
                                default: l(t => [e(D, {
                                    style: {width: "100%"},
                                    modelValue: t.row.weigh,
                                    "onUpdate:modelValue": f => t.row.weigh = f,
                                    step: 1,
                                    precision: 0,
                                    placeholder: "权重",
                                    min: 0,
                                    max: 1e4,
                                    "controls-position": "right",
                                    size: "large"
                                }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 1
                            }), e(U, {label: "状态", width: "100"}, {
                                default: l(t => [e(se, {
                                    modelValue: t.row.status,
                                    "onUpdate:modelValue": f => t.row.status = f,
                                    size: "small"
                                }, {
                                    default: l(() => [e(E, {label: 1, value: 1, border: ""}, {
                                        default: l(() => [u("正常")]),
                                        _: 1
                                    }), e(E, {
                                        label: 2,
                                        value: 2,
                                        border: "",
                                        style: {"margin-top": "4px"}
                                    }, {default: l(() => [u("下架")]), _: 1})]), _: 2
                                }, 1032, ["modelValue", "onUpdate:modelValue"])]), _: 1
                            }), e(U, {label: "操作", width: "60"}, {
                                default: l(t => [e(A, {
                                    type: "danger",
                                    icon: "Delete",
                                    circle: "",
                                    onClick: f => m(t.$index)
                                }, null, 8, ["onClick"])]), _: 1
                            })]), _: 1
                        }, 8, ["data", "header-cell-style"]), e(ie, {
                            class: "border-top mt-4 pt-4",
                            justify: "center"
                        }, {
                            default: l(() => [e(A, {
                                size: "large",
                                type: "primary",
                                icon: "Plus",
                                plain: "",
                                onClick: ae
                            }, {default: l(() => [u(" 新增规格 ")]), _: 1})]), _: 1
                        })])) : h("", !0)]), _: 1
                    }, 8, ["model", "rules"])]),
                    _: 1
                }, 8, ["title"])])
            }
        }
    }, Re = {class: "admin-lists"}, Te = {class: "d-flex justify-content-between"}, Pe = {class: "mt-4"},
    Fe = {class: "d-flex justify-content-end mt-4"}, Se = {
        __name: "index", setup(me) {
            const T = y(null), P = y(!1), v = pe({status: 0, id: "", name: "", intro: ""}),
                H = ne(() => re.state.app.config), {
                    pager: g,
                    getLists: w,
                    resetPage: _,
                    resetParams: le
                } = we({fetchFun: N.goods.list, params: v}), z = async () => {
                    P.value = !0, await de(), await T.value.open()
                }, F = async (x, r = "edit") => {
                    P.value = !0, await de(), await T.value.open(r), await T.value.setFormData(x)
                }, L = async x => {
                    await q.confirm("确定要删除吗？");
                    const r = await N.goods.delete({id: x});
                    r.error ? q.msgError(r.msg) : (q.msgSuccess(r.msg), w())
                }, a = (x, r) => {
                    v.status = x.props.name, w()
                };
            return w(), (x, r) => {
                const I = n("el-tab-pane"), te = n("el-tabs"), C = n("el-button"), K = n("el-input"), S = n("el-form-item"),
                    ae = n("el-form"), m = n("el-table-column"), oe = n("el-image"), B = n("el-tag"), M = n("el-table"),
                    J = n("la-pagination"), W = n("el-card"), p = ue("perms"), o = ue("loading");
                return i(), k("div", Re, [e(te, {
                    modelValue: v.status,
                    "onUpdate:modelValue": r[0] || (r[0] = s => v.status = s),
                    class: "demo-tabs",
                    onTabClick: a
                }, {
                    default: l(() => [e(I, {label: "全部", name: 0}), e(I, {label: "正常", name: 1}), e(I, {
                        label: "下架",
                        name: 2
                    })]), _: 1
                }, 8, ["modelValue"]), e(W, {class: "border-none mb-4", shadow: "never"}, {
                    default: l(() => [$("div", Te, [Q((i(), c(C, {
                        icon: "Plus",
                        type: "primary",
                        onClick: z
                    }, {default: l(() => [u(" 新增 ")]), _: 1})), [[p, ["admin/shop.goods/create"]]]), e(ae, {
                        model: v,
                        inline: ""
                    }, {
                        default: l(() => [e(S, {label: "ID", props: "id"}, {
                            default: l(() => [e(K, {
                                modelValue: v.id,
                                "onUpdate:modelValue": r[1] || (r[1] = s => v.id = s),
                                style: {width: "84px"},
                                clearable: "",
                                onKeyup: Z(V(_), ["enter"])
                            }, null, 8, ["modelValue", "onKeyup"])]), _: 1
                        }), e(S, {label: "名称", props: "name"}, {
                            default: l(() => [e(K, {
                                modelValue: v.name,
                                "onUpdate:modelValue": r[2] || (r[2] = s => v.name = s),
                                clearable: "",
                                onKeyup: Z(V(_), ["enter"])
                            }, null, 8, ["modelValue", "onKeyup"])]), _: 1
                        }), e(S, {label: "介绍", props: "intro"}, {
                            default: l(() => [e(K, {
                                modelValue: v.intro,
                                "onUpdate:modelValue": r[3] || (r[3] = s => v.intro = s),
                                clearable: "",
                                onKeyup: Z(V(_), ["enter"])
                            }, null, 8, ["modelValue", "onKeyup"])]), _: 1
                        }), e(S, {style: {"margin-right": "0"}}, {
                            default: l(() => [e(C, {
                                type: "primary",
                                onClick: V(_),
                                icon: "Search"
                            }, {default: l(() => [u("查询")]), _: 1}, 8, ["onClick"]), e(C, {
                                onClick: V(le),
                                icon: "Refresh"
                            }, {default: l(() => [u("重置")]), _: 1}, 8, ["onClick"])]), _: 1
                        })]), _: 1
                    }, 8, ["model"])]), Q((i(), k("div", Pe, [e(M, {
                        data: V(g).lists,
                        size: "large",
                        "row-key": "id",
                        "default-expand-all": "",
                        stripe: "",
                        "header-cell-style": {background: "var(--el-bg-color-page)"}
                    }, {
                        default: l(() => [e(m, {prop: "id", label: "ID", sortable: "", width: "85"}), e(m, {
                            prop: "weigh",
                            label: "权重",
                            sortable: "",
                            width: "85"
                        }), e(m, {prop: "name", label: "名称", "min-width": "200"}), e(m, {
                            prop: "intro",
                            label: "介绍",
                            "min-width": "200",
                            "show-overflow-tooltip": ""
                        }), e(m, {
                            prop: "imgs",
                            label: "图片",
                            "min-width": "200"
                        }, {
                            default: l(({row: s}) => [e(oe, {
                                style: {
                                    width: "48px",
                                    height: "48px",
                                    "border-radius": "4px",
                                    margin: "2px"
                                },
                                fit: "cover",
                                src: s.imgs[0],
                                "initial-index": 0,
                                "preview-src-list": s.imgs,
                                lazy: "",
                                "preview-teleported": "",
                                "hide-on-click-modal": ""
                            }, null, 8, ["src", "preview-src-list"])]), _: 1
                        }), H.value.classify ? (i(), c(m, {
                            key: 0,
                            prop: "classify_ids",
                            label: "分类",
                            "min-width": "200"
                        }, {
                            default: l(({row: s}) => [(i(!0), k(G, null, ee(s.classifys, (d, X) => (i(), c(B, {
                                style: {margin: "2px"},
                                type: "info"
                            }, {default: l(() => [u(R(d), 1)]), _: 2}, 1024))), 256))]), _: 1
                        })) : h("", !0), e(m, {
                            prop: "tags",
                            label: "标签",
                            "min-width": "200"
                        }, {
                            default: l(({row: s}) => [(i(!0), k(G, null, ee(s.tags, (d, X) => (i(), c(B, {
                                style: {margin: "2px"},
                                type: "info"
                            }, {default: l(() => [u(R(d), 1)]), _: 2}, 1024))), 256))]), _: 1
                        }), e(m, {prop: "browse", label: "浏览数", width: "80"}), e(m, {
                            prop: "cart",
                            label: "加购数",
                            width: "80"
                        }), e(m, {prop: "buy", label: "购买数", width: "80"}), H.value.taobao ? (i(), c(m, {
                            key: 1,
                            prop: "type",
                            label: "类型",
                            width: "100"
                        }, {
                            default: l(({row: s}) => [e(B, {type: s.type == 1 ? "primary" : "warning"}, {
                                default: l(() => [u(R(s.type == 1 ? "普通商品" : "淘宝客"), 1)]),
                                _: 2
                            }, 1032, ["type"])]), _: 1
                        })) : h("", !0), e(m, {
                            prop: "create_time",
                            label: "创建时间",
                            width: "180",
                            sortable: ""
                        }), e(m, {
                            prop: "update_time",
                            label: "编辑时间",
                            width: "180",
                            sortable: ""
                        }), e(m, {
                            prop: "status",
                            label: "状态",
                            width: "100",
                            fixed: "right"
                        }, {
                            default: l(({row: s}) => [e(B, {type: s.status == 2 ? "info" : "success"}, {
                                default: l(() => [u(R(s.status == 2 ? "下架" : "正常"), 1)]),
                                _: 2
                            }, 1032, ["type"])]), _: 1
                        }), e(m, {
                            label: "操作",
                            width: "160",
                            fixed: "right"
                        }, {
                            default: l(({row: s}) => [Q((i(), c(C, {
                                link: "",
                                type: "success",
                                onClick: d => F(s, "copy")
                            }, {
                                default: l(() => [u(" 复制 ")]),
                                _: 2
                            }, 1032, ["onClick"])), [[p, ["admin/shop.goods/create"]]]), Q((i(), c(C, {
                                link: "",
                                type: "primary",
                                onClick: d => F(s)
                            }, {
                                default: l(() => [u(" 编辑 ")]),
                                _: 2
                            }, 1032, ["onClick"])), [[p, ["admin/shop.goods/update"]]]), Q((i(), c(C, {
                                link: "",
                                type: "danger",
                                onClick: d => L(s.id)
                            }, {
                                default: l(() => [u(" 删除 ")]),
                                _: 2
                            }, 1032, ["onClick"])), [[p, ["admin/shop.goods/delete"]]])]), _: 1
                        })]), _: 1
                    }, 8, ["data", "header-cell-style"])])), [[o, V(g).loading]]), $("div", Fe, [e(J, {
                        modelValue: V(g),
                        "onUpdate:modelValue": r[4] || (r[4] = s => Ve(g) ? g.value = s : null),
                        onChange: V(w)
                    }, null, 8, ["modelValue", "onChange"])])]), _: 1
                }), P.value ? (i(), c(De, {
                    key: 0,
                    ref_key: "editRef",
                    ref: T,
                    onSuccess: V(w),
                    onClose: r[5] || (r[5] = s => P.value = !1)
                }, null, 8, ["onSuccess"])) : h("", !0)])
            }
        }
    };
export {Se as default};
